; Disassembly of the file "z:\ramdisk\home\knoppix\none\MASTERY_BOOT_2K_COBRA_80K.bin"
; 
; CPU Type: Z80
; 
; Created with dZ80 2.0
; 
; on Friday, 17 of May 2013 at 10:52 PM
; 
;				############################## START ROUTINE ####################################
;
0000 3E83      LD      A,$83	; bit 7 = "1"
0002 ED4F      LD      R,A	; u36/5 kept at "1" after NPOR="0", so the computer stays in the startup hw config
0004 3173FD    LD      SP,$FD73	; set stack at FD73
0007 2100C0    LD      HL,$C000	; *0* C000 is the start addr for video mem in startup hw configuration (C0->40 @ 0009)
000A 1101C0    LD      DE,$C001	; *1* C001 is the start addr+1 for video mem in startup hw configuration (C0->40 @ 000C)
000D 01FF1B    LD      BC,$1BFF	; 1AFF+1 is the standard total size of Spectrum video memory
0010 3600      LD      (HL),$00	; this will fill up all video memory with zeros when the LDIR below executes
0012 EDB0      LDIR
0014 210000    LD      HL,$0000	; start address of this BOOT EPROM code					---@@@0016:00->28
0017 110080    LD      DE,$8000	; start address of DRAM#0 in the startup config
001A 010008    LD      BC,$0800	; 0800h (2K) is the length of this BOOT EPROM code
001D EDB0      LDIR		; entire BOOT EPROM code is copied from EPROM into DRAM#0
001F 3E03      LD      A,$03	; channel control word for Z80CTC, used in the next 4 instructions:
;				; (Disable Interrupt, Timer mode, Prescaler=16, CLK/TRG Falling Edge,
;				; Auto Trigger, No Time Const. Follows, Reset Channel)
0021 D3E3      OUT     ($E3),A	; reset CTC channel 0
0023 D3EB      OUT     ($EB),A	; reset CTC channel 1
0025 D3F3      OUT     ($F3),A	; reset CTC channel 2
0027 D3FB      OUT     ($FB),A	; reset CTC channel 3
0029 AF        XOR     A	; set A register to "00"
002A D3FD      OUT     ($FD),A	; write "00" to 8272 Data Register (invalid command, places 8272 in standby)
002C 3E92      LD      A,$92	; control word for 8255: Mode Set flag=active,
;				; 			Group A: Select Mode 0,
;				;				 Port A set to Input mode,
;				;				 Port C (upper half) set to Output Mode,
;				;			Group B: Select Mode 0,
;				;				 Port B set to Input Mode,
;				;				 Port C (lower half) set to Output Mode
002E D3DF      OUT     ($DF),A	; write control word to 8255
0030 D3DF      OUT     ($DF),A	; write control word to 8255 (again !?)
0032 3E40      LD      A,$40
0034 D3FE      OUT     ($FE),A	; write 40 to port C of 8255
;				; (set border to black, set signal "SO" to 0, set signal "O5" to 0,
;				;  set signal "O6" to 1 to allow access to video memory in the hw startup config)
0036 181E      JR      $0056	;###################### START ROUTINE CONTINUES AT 0056 #########################
;
;				############################## BASIC CONFIGURATION ##############################
;
0038 210040    LD      HL,$4000	; 4000 is the start addr of BASIC EPROM in the startup hw config
003B 110080    LD      DE,$8000	; 8000 is the start addr of DRAM#0 in the startup hw config
003E 010040    LD      BC,$4000	; 4000 is the length of the SPECTRUM BASIC code (16 KB)
0041 EDB0      LDIR		; copy SPECTRUM BASIC code into DRAM#0
0043 D9        EXX		; (after EXX, HL contains 0000, see line 07F4)
0044 3E03      LD      A,$03	;	SAME AS	]
0046 D3E3      OUT     ($E3),A	;		]
0048 D3EB      OUT     ($EB),A	;	001F	]
004A D3F3      OUT     ($F3),A	;		]
004C D3FB      OUT     ($FB),A	;	 to	]
004E AF        XOR     A	;		]
004F D3FD      OUT     ($FD),A	;	002A	]
0051 D3FE      OUT     ($FE),A	; write 03 to port C of 8255
;				; (set border to white, set signal "SO" to 0, set signal "O5" to 0,
;				;  set signal "O6" to 0)
0053 ED4F      LD      R,A	; set bit 7 of R to 0, prepare for BASIC hardware configuration
0055 E9        JP      (HL)	; change hardware configuration with a jump to (HL)
;
;				############################# END OF BASIC CONFIGURATION ########################
;
;				; ###################### START ROUTINE CONTINUED ################################
0056 DD219003  LD      IX,$0390	; data table base address (0390-03C9)					---@@@0059:03->2B
005A 0E1D      LD      C,$1D
005C DD4601    LD      B,(IX+$01) ; <--- <--- <--- <----|
005F 21C203    LD      HL,$03C2	; another data table base addr (03CA to 03CA+9*8-1=0411)		---@@@0061:03->2B
0062 110800    LD      DE,$0008	;			|
0065 19        ADD     HL,DE	; <-----|		|
0066 10FD      DJNZ    $0065	; ----->|		|
0068 DD5E00    LD      E,(IX+$00) ;			|
006B 16C8      LD      D,$C8	; C800=start of mid. third serial video mem
006D 0608      LD      B,$08	;			|
006F 7E        LD      A,(HL)	; <-----|		|
0070 12        LD      (DE),A	;	|		|
0071 14        INC     D	;	|		|
0072 23        INC     HL	;	|		|
0073 10FA      DJNZ    $006F	; ----->|8 loops	|
0075 DD23      INC     IX	;			|
0077 DD23      INC     IX	;			|
0079 0D        DEC     C	;			|
007A 20E0      JR      NZ,$005C	; ---> ---> ---> ------>|29 loops (1Dh)
007C DD213204  LD      IX,$0432	; data table								---@@@007F:04->2C
0080 11564D    LD      DE,$4D56
0083 CDBB00    CALL    $00BB	;									---@@@0085:00->28
0086 11B9AA    LD      DE,$AAB9
0089 CDBB00    CALL    $00BB	;									---@@@008B:00->28
008C 2100D9    LD      HL,$D900
008F 1101D9    LD      DE,$D901
0092 019E00    LD      BC,$009E
0095 3642      LD      (HL),$42
0097 EDB0      LDIR
0099 3641      LD      (HL),$41
009B 015D00    LD      BC,$005D
009E EDB0      LDIR
00A0 2166D9    LD      HL,$D966
00A3 014104    LD      BC,$0441
00A6 71        LD      (HL),C	; <---|
00A7 23        INC     HL	;     |
00A8 10FC      DJNZ    $00A6	; --->|
00AA 23        INC     HL
00AB 71        LD      (HL),C
00AC 2186D9    LD      HL,$D986
00AF 71        LD      (HL),C
00B0 0C        INC     C
00B1 21A8D9    LD      HL,$D9A8
00B4 71        LD      (HL),C
00B5 21C8D9    LD      HL,$D9C8
00B8 71        LD      (HL),C
00B9 1821      JR      $00DC	; ############## CONTINUES AT 00DC ##############

				; ###########
				; reads from table indexed by IX and
				; writes in the mid. third serial video mem
				; at displacement in register D
00BB 0E03      LD      C,$03
00BD 6A        LD      L,D	; <--- <--- <--- <--- <--- <----|
00BE 26C8      LD      H,$C8	; <--- <--- <--- <---|		| C800=serial video mem
00C0 0604      LD      B,$04	;		     |		|
00C2 24        INC     H	; <-----|	     |		|
00C3 DD7E00    LD      A,(IX+$00) ;	|	     |		|
00C6 77        LD      (HL),A	;	|	     |		|
00C7 DD23      INC     IX	;	|	     |		|
00C9 24        INC     H	;	|	     |		|
00CA 10F6      DJNZ    $00C2	; ----->|4 loops     |		|
00CC 2C        INC     L	;		     |		|
00CD 7B        LD      A,E	;		     |		|
00CE BD        CP      L	;		     |		|
00CF 20ED      JR      NZ,$00BE	; ---> ---> ---> --->|		|
00D1 C620      ADD     A,$20	;				|
00D3 5F        LD      E,A	;				|
00D4 7A        LD      A,D	;				|
00D5 C620      ADD     A,$20	;				|
00D7 57        LD      D,A	;				|
00D8 0D        DEC     C	;				|
00D9 20E2      JR      NZ,$00BD	; ---> ---> ---> ---> ---> ---->|3 loops
00DB C9        RET

00DC DD2100DB  LD      IX,$DB00	; ######## CONTINUED <----| FROM 00B9 #############
00E0 0610      LD      B,$10	;			  |
00E2 C5        PUSH    BC	; <--- <---|		  |
00E3 DD7E02    LD      A,(IX+$02) ;	   |		  |
00E6 B7        OR      A	;	   |		  |
00E7 2839      JR      Z,$0122	; ---> -------->|	  |
00E9 DD3502    DEC     (IX+$02)	;	   |	|	  |
00EC 0606      LD      B,$06	;	   | <--- <--- <--- <---|
00EE DD23      INC     IX	; <---|	   |	|	  |	|
00F0 10FC      DJNZ    $00EE	; --->|	   |	|	  |	|
00F2 C1        POP     BC	;	   |	|	  |	|
00F3 10ED      DJNZ    $00E2	; ---> --->|	|	  |	|
00F5 3E7F      LD      A,$7F	; KA15		|	  |	|
00F7 DBFE      IN      A,($FE)	;		|	  |	|
00F9 E610      AND     $10	; "B"		|	  |	|
00FB CAF007    JP      Z,$07F0	; BASIC		|	  |	|					---@@@00FD:07->2F
00FE 3EDF      LD      A,$DF	; KA13		|	  |	|
0100 DBFE      IN      A,($FE)	;		|	  |	|
0102 E602      AND     $02	; "O"		|	  |	|
0104 CAF407    JP      Z,$07F4	; OPUS		|	  |	|					---@@@0106:07->2F
0107 3EFD      LD      A,$FD	; KA9		|	  |	|
0109 DBFE      IN      A,($FE)	;		|	  |	|
010B E604      AND     $04	; "D"		|	  |	|
010D CA5205    JP      Z,$0552	; CP/M		|	  |	|					---@@@010F:05->2D
0110 3EBF      LD      A,$BF	; KA14		|	  |	|
0112 DBFE      IN      A,($FE)	;		|	  |	|
0114 E602      AND     $02	; "L"		|	  |	|
0116 CAEA01    JP      Z,$01EA	;		|	  |	|					---@@@0118:01->29
0119 DBDF      IN      A,($DF)	; port B 8255	|	  |	|
011B E610      AND     $10	; bit 4		|	  |	|
011D C2EA01    JP      NZ,$01EA	;		|	  |	|					---@@@011F:01->29
0120 18BA      JR      $00DC	; ---> ---> -----> ------>|	|
0122 CDD301    CALL    $01D3	; <--- <--- <---|		|					---@@@0124:01->29
0125 3AFFF7    LD      A,($F7FF) ;				|
0128 FEF0      CP      $F0	;				|
012A 3808      JR      C,$0134	;				|
012C DD7E04    LD      A,(IX+$04) ;				|
012F EE01      XOR     $01	;				|
0131 DD7704    LD      (IX+$04),A ;				|
0134 CDD301    CALL    $01D3	;				|					---@@@0136:01->29
0137 3AFFF7    LD      A,($F7FF) ;				|
013A E67F      AND     $7F	;				|
013C DD7702    LD      (IX+$02),A ;				|
013F DD7E05    LD      A,(IX+$05) ;				|
0142 B7        OR      A	;				|
0143 281E      JR      Z,$0163	;				|
0145 DD7E04    LD      A,(IX+$04) ;				|
0148 B7        OR      A	;				|
0149 2813      JR      Z,$015E	;				|
014B DD7E05    LD      A,(IX+$05) ;				|
014E 3C        INC     A	;				|
014F FE04      CP      $04	;				|
0151 2805      JR      Z,$0158	; ---> --->|			|
0153 DD3405    INC     (IX+$05)	;	   |			|
0156 1847      JR      $019F	; ---> -----> ---> ---->|	|
0158 DD360400  LD      (IX+$04),$00 ;<-----|		V	|
015C 1841      JR      $019F	; ---> ---> ---> ------>|	|
015E DD3505    DEC     (IX+$05)	;			V	|
0161 183C      JR      $019F	; ---> ---> ---> ------>|	|
0163 3E01      LD      A,$01	;			|	|
0165 DD7705    LD      (IX+$05),A ;			|	|
0168 DD7704    LD      (IX+$04),A ;			|	|
016B CDD301    CALL    $01D3	; <---|			|	|					---@@@016D:01->29
016E 3AFFF7    LD      A,($F7FF) ;    |			|	|
0171 E647      AND     $47	;     |			|	|
0173 4F        LD      C,A	;     |			|	|
0174 E607      AND     $07	;     |			|	|
0176 FE07      CP      $07	;     |			|	|
0178 28F1      JR      Z,$016B	; --->|			|	|
017A DD7103    LD      (IX+$03),C ;			|	|
017D CDD301    CALL    $01D3	; <---|<--- <---|	|	|					---@@@017F:01->29
0180 2AFEF7    LD      HL,($F7FE) ;   |		|	|	|
0183 7C        LD      A,H	;     |		|	|	|
0184 E618      AND     $18	;     |		|	|	|
0186 FE18      CP      $18	;     |		|	|	|
0188 28F3      JR      Z,$017D	; --->|		|	|	|
018A F6C0      OR      $C0	;		|	|	|
018C 67        LD      H,A	;		|	|	|
018D E5        PUSH    HL	;		|	|	|
018E 0608      LD      B,$08	;		|	|	|
0190 AF        XOR     A	;		|	|	|
0191 B6        OR      (HL)	; <---|		|	|	|
0192 24        INC     H	;     |		|	|	|
0193 10FC      DJNZ    $0191	; --->|8 loops	|	|	|
0195 E1        POP     HL	;		|	|	|
0196 B7        OR      A	;		|	|	|
0197 20E4      JR      NZ,$017D	; ---> ---> --->|	|	|
0199 DD7500    LD      (IX+$00),L ;			|	|
019C DD7401    LD      (IX+$01),H ;			|	|
019F 211204    LD      HL,$0412	; <--- <--- <--- <------|	|					---@@@01A1:04->2C
01A2 DD4605    LD      B,(IX+$05) ;				|
01A5 78        LD      A,B	;				|
01A6 B7        OR      A	;				|
01A7 2806      JR      Z,$01AF	; ---> ---> --->|		|
01A9 110800    LD      DE,$0008	;		|		|
01AC 19        ADD     HL,DE	; <---|		|		|
01AD 10FD      DJNZ    $01AC	; --->|		|		|
01AF EB        EX      DE,HL	; <--- <--- <---|		|
01B0 DD6E00    LD      L,(IX+$00) ;				|
01B3 DD6601    LD      H,(IX+$01) ;				|
01B6 0608      LD      B,$08	;				|
01B8 1A        LD      A,(DE)	; <---|				|
01B9 77        LD      (HL),A	;     |				|
01BA 13        INC     DE	;     |				|
01BB 24        INC     H	;     |				|
01BC 10FA      DJNZ    $01B8	; --->|				|
01BE DD7E01    LD      A,(IX+$01) ;				|
01C1 CB0F      RRC     A	;				|
01C3 CB0F      RRC     A	;				|
01C5 CB0F      RRC     A	;				|
01C7 E603      AND     $03	;				|
01C9 F6D8      OR      $D8	;				|
01CB 67        LD      H,A	;				|
01CC DD7E03    LD      A,(IX+$03) ;				|
01CF 77        LD      (HL),A	;				|
01D0 C3EC00    JP      $00EC	; ---> ---> ---> ---> ---> ---->|					---@@@01D2:00->28
				; ########### F9D3 (in CP/M config)
01D3 F5        PUSH    AF
01D4 E5        PUSH    HL
01D5 D5        PUSH    DE
01D6 C5        PUSH    BC
01D7 2AFEF7    LD      HL,($F7FE)
01DA 23        INC     HL
01DB 54        LD      D,H
01DC 5D        LD      E,L
01DD 0604      LD      B,$04
01DF 19        ADD     HL,DE
01E0 10FD      DJNZ    $01DF
01E2 22FEF7    LD      ($F7FE),HL
01E5 C1        POP     BC
01E6 D1        POP     DE
01E7 E1        POP     HL
01E8 F1        POP     AF
01E9 C9        RET
				; ########### CP/M ###########
01EA 21F201    LD      HL,$01F2	; jump addr in new config (3 lines below)
01ED 3E41      LD      A,$41
01EF C35100    JP      $0051	; O6=1, border=blue, change config to CP/M				---@@@01F1:00->28
				; continue to next line under CP/M hardware cfg
01F2 AF        XOR     A	; A=00
01F3 D3FE      OUT     ($FE),A	; O6=0, border=black
01F5 210000    LD      HL,$0000	; * relocate this
01F8 1100F8    LD      DE,$F800	; * BOOT code again
01FB 010008    LD      BC,$0800	; * to F800-FFFF
01FE EDB0      LDIR		; *
0200 C303FA    JP      $FA03	; continues with exactly next line at FA03
0203 F3        DI
0204 CDD3F9    CALL    $F9D3
0207 2AFEF7    LD      HL,($F7FE)
020A 220AFB    LD      ($FB0A),HL
020D CDD3F9    CALL    $F9D3
0210 2AFEF7    LD      HL,($F7FE)
0213 220CFB    LD      ($FB0C),HL
0216 CDD3F9    CALL    $F9D3
0219 2AFEF7    LD      HL,($F7FE)
021C 220EFB    LD      ($FB0E),HL
021F CD4AFA    CALL    $FA4A
0222 CD77FA    CALL    $FA77
0225 38F8      JR      C,$021F
0227 2110FB    LD      HL,$FB10
022A 3A0EFB    LD      A,($FB0E)
022D BE        CP      (HL)
022E 20EF      JR      NZ,$021F
0230 23        INC     HL
0231 3A0FFB    LD      A,($FB0F)
0234 BE        CP      (HL)
0235 20E8      JR      NZ,$021F
0237 3A12FB    LD      A,($FB12)
023A FE01      CP      $01
023C 20E1      JR      NZ,$021F
023E 3A13FB    LD      A,($FB13)
0241 B7        OR      A
0242 20DB      JR      NZ,$021F
0244 CDC0FA    CALL    $FAC0
0247 C30000    JP      $0000
				; ########## FA4A (in CP/M config)
024A 2106FB    LD      HL,$FB06
024D 010800    LD      BC,$0008
0250 C5        PUSH    BC	; <--- <--- <--- <---|
0251 1608      LD      D,$08	;		     |
0253 5E        LD      E,(HL)	;		     |
0254 0603      LD      B,$03	; <--- <--- <---|    |
0256 CB03      RLC     E	;		|    |
0258 3002      JR      NC,$025C	; --->|		|    |
025A 060C      LD      B,$0C	;     |		|    |
025C 3E80      LD      A,$80	; <---|		|    |
025E D3FE      OUT     ($FE),A	;		|    |
0260 10FE      DJNZ    $0260	;		|    |
0262 AF        XOR     A	;		|    |
0263 00        NOP		;		|    |
0264 D3FE      OUT     ($FE),A	;		|    |
0266 0618      LD      B,$18	;		|    |
0268 10FE      DJNZ    $0268	;		|    |
026A 15        DEC     D	;		|    |
026B C254FA    JP      NZ,$FA54	; ---> ---> --->|    |
026E C1        POP     BC	;		     |
026F 23        INC     HL	;		     |
0270 0B        DEC     BC	;		     |
0271 78        LD      A,B	;		     |
0272 B1        OR      C	;		     |
0273 C250FA    JP      NZ,$FA50	; ---> ---> ---> --->|
0276 C9        RET
				; ########## FA77 (in CP/M config)
0277 2110FB    LD      HL,$FB10
027A 010400    LD      BC,$0004
027D C5        PUSH    BC	; <--- <--- <--- <---|
027E 3A14FB    LD      A,($FB14)	;	     |
0281 4F        LD      C,A	;		     |
0282 110008    LD      DE,$0800	;		     |
0285 DBFE      IN      A,($FE)	; <--- <--- <---|    |
0287 A1        AND     C	;		|    |
0288 2033      JR      NZ,$02BD	; ----->|	|    |
028A 0680      LD      B,$80	;	|	|    |
028C DBFE      IN      A,($FE)	;	|	|    |
028E A1        AND     C	;	|	|    |
028F C296FA    JP      NZ,$FA96	; --->|	|	|    |
0292 10F8      DJNZ    $028C	;     |	|	|    |
0294 1827      JR      $02BD	;     |	|	|    |
0296 0608      LD      B,$08	; <---|	|	|    |
0298 10FE      DJNZ    $0298	;	|	|    |
029A DBFE      IN      A,($FE)	;	|	|    |
029C A1        AND     C	;	|	|    |
029D CAA6FA    JP      Z,$FAA6	; --->|	|	|    |
02A0 CBFB      SET     7,E	;     |	|	|    |
02A2 0605      LD      B,$05	;     |	|	|    |
02A4 10FE      DJNZ    $02A4	;     |	|	|    |
02A6 CB03      RLC     E	; <---|	|	|    |
02A8 15        DEC     D	;	|	|    |
02A9 C285FA    JP      NZ,$FA85	; ---> ---> --->|    |
02AC DBFE      IN      A,($FE)	;	|	     |
02AE A1        AND     C	;	V	     |
02AF 200C      JR      NZ,$02BD	; ----->|	     |
02B1 73        LD      (HL),E	;	V	     |
02B2 C1        POP     BC	;	|	     |
02B3 23        INC     HL	;	|	     |
02B4 0B        DEC     BC	;	|	     |
02B5 78        LD      A,B	;	|	     |
02B6 B1        OR      C	;	|	     |
02B7 C27DFA    JP      NZ,$FA7D	; ---> ---> ---> --->|
02BA 37        SCF		;	|
02BB 3F        CCF		;	|
02BC C9        RET		;	|

02BD C1        POP     BC	; <-----|
02BE 37        SCF
02BF C9        RET
				; ########## FAC0 (in CP/M config)
02C0 0600      LD      B,$00
02C2 DBFE      IN      A,($FE)	; <--- <-----|
02C4 E6C0      AND     $C0	;	     |
02C6 FEC0      CP      $C0	;	     |
02C8 2003      JR      NZ,$02CD	; --->|      |
02CA 10F6      DJNZ    $02C2	; -----> --->|
02CC C9        RET		;     |
				;     |
02CD 210000    LD      HL,$0000	; <---|
02D0 010010    LD      BC,$1000
02D3 C5        PUSH    BC	; <--- <--- <---|
02D4 010080    LD      BC,$8000	;		|
02D7 110004    LD      DE,$0400	;		|
02DA 79        LD      A,C	; <---|		|
02DB A8        XOR     B	;     |		|
02DC D3FE      OUT     ($FE),A	;     |		|
02DE 4F        LD      C,A	;     |		|
02DF DBFE      IN      A,($FE)	;     |		|
02E1 DBFE      IN      A,($FE)	;     |		|
02E3 DBFE      IN      A,($FE)	;     |		|
02E5 DBFE      IN      A,($FE)	;     |		|
02E7 DBFE      IN      A,($FE)	;     |		|
02E9 DBFE      IN      A,($FE)	;     |		|
02EB DBFE      IN      A,($FE)	;     |		|
02ED 00        NOP		;     |		|
02EE DBFE      IN      A,($FE)	;     |		|
02F0 E6C0      AND     $C0	;     |		|
02F2 B3        OR      E	;     |		|
02F3 5F        LD      E,A	;     |		|
02F4 CB03      RLC     E	;     |		|
02F6 CB03      RLC     E	;     |		|
02F8 15        DEC     D	;     |		|
02F9 C2DAFA    JP      NZ,$FADA	; --->|		|
02FC C1        POP     BC	;		|
02FD 73        LD      (HL),E	;		|
02FE 23        INC     HL	;		|
02FF 0B        DEC     BC	;		|
0300 78        LD      A,B	;		|
0301 B1        OR      C	;		|
0302 C2D3FA    JP      NZ,$FAD3	; ---> ---> --->|
0305 C9        RET
				; ########## EMPTY SPACE ############
0306 01        DB      $01
0307 00        DB      $00
0308 00        DB      $00
0309 00        DB      $00
030A 00        DB      $00
030B 00        DB      $00
030C 00        DB      $00
030D 00        DB      $00
030E 00        DB      $00
030F 00        DB      $00
0310 00        DB      $00
0311 00        DB      $00
0312 00        DB      $00
0313 00        DB      $00
0314 80        DB      $80
0315 00        DB      $00
0316 00        DB      $00
0317 00        DB      $00
0318 00        DB      $00
0319 00        DB      $00
031A 00        DB      $00
031B 00        DB      $00
031C 00        DB      $00
031D 00        DB      $00
031E 00        DB      $00
031F 00        DB      $00
0320 00        DB      $00
0321 00        DB      $00
0322 00        DB      $00
0323 00        DB      $00
0324 00        DB      $00
0325 00        DB      $00
0326 00        DB      $00
0327 00        DB      $00
0328 00        DB      $00
0329 00        DB      $00
032A 00        DB      $00
032B 00        DB      $00
032C 00        DB      $00
032D 00        DB      $00
032E 00        DB      $00
032F 00        DB      $00
0330 00        DB      $00
0331 00        DB      $00
0332 00        DB      $00
0333 00        DB      $00
0334 00        DB      $00
0335 00        DB      $00
0336 00        DB      $00
0337 00        DB      $00
0338 00        DB      $00
0339 00        DB      $00
033A 00        DB      $00
033B 00        DB      $00
033C 00        DB      $00
033D 00        DB      $00
033E 00        DB      $00
033F 00        DB      $00
0340 00        DB      $00
0341 00        DB      $00
0342 00        DB      $00
0343 00        DB      $00
0344 00        DB      $00
0345 00        DB      $00
0346 00        DB      $00
0347 00        DB      $00
0348 00        DB      $00
0349 00        DB      $00
034A 00        DB      $00
034B 00        DB      $00
034C 00        DB      $00
034D 00        DB      $00
034E 00        DB      $00
034F 00        DB      $00
0350 00        DB      $00
0351 00        DB      $00
0352 00        DB      $00
0353 00        DB      $00
0354 00        DB      $00
0355 00        DB      $00
0356 00        DB      $00
0357 00        DB      $00
0358 00        DB      $00
0359 00        DB      $00
035A 00        DB      $00
035B 00        DB      $00
035C 00        DB      $00
035D 00        DB      $00
035E 00        DB      $00
035F 00        DB      $00
0360 00        DB      $00
0361 00        DB      $00
0362 00        DB      $00
0363 00        DB      $00
0364 00        DB      $00
0365 00        DB      $00
0366 00        DB      $00
0367 00        DB      $00
0368 00        DB      $00
0369 00        DB      $00
036A 00        DB      $00
036B 00        DB      $00
036C 00        DB      $00
036D 00        DB      $00
036E 00        DB      $00
036F 00        DB      $00
0370 00        DB      $00
0371 00        DB      $00
0372 00        DB      $00
0373 00        DB      $00
0374 00        DB      $00
0375 00        DB      $00
0376 00        DB      $00
0377 00        DB      $00
0378 00        DB      $00
0379 00        DB      $00
037A 00        DB      $00
037B 00        DB      $00
037C 00        DB      $00
037D 00        DB      $00
037E 00        DB      $00
037F 00        DB      $00
0380 00        DB      $00
0381 00        DB      $00
0382 00        DB      $00
0383 00        DB      $00
0384 00        DB      $00
0385 00        DB      $00
0386 00        DB      $00
0387 00        DB      $00
0388 00        DB      $00
0389 00        DB      $00
038A 00        DB      $00
038B 00        DB      $00
038C 00        DB      $00
038D 00        DB      $00
038E 00        DB      $00
038F 00        DB      $00
				; ########## DATA TABLE #1 ###########
0390 28        DB      $28
0391 05        DB      $05
0392 29        DB      $29
0393 02        DB      $02
0394 2A        DB      $2A
0395 08        DB      $08
0396 2B        DB      $2B
0397 02        DB      $02
0398 2C        DB      $2C
0399 07        DB      $07
039A 48        DB      $48
039B 01        DB      $01
039C 4A        DB      $4A
039D 01        DB      $01
039E 4C        DB      $4C
039F 01        DB      $01
03A0 66        DB      $66
03A1 05        DB      $05
03A2 67        DB      $67
03A3 02        DB      $02
03A4 68        DB      $68
03A5 02        DB      $02
03A6 69        DB      $69
03A7 02        DB      $02
03A8 6A        DB      $6A
03A9 01        DB      $01
03AA 6B        DB      $6B
03AB 03        DB      $03
03AC 6C        DB      $6C
03AD 01        DB      $01
03AE 86        DB      $86
03AF 01        DB      $01
03B0 88        DB      $88
03B1 01        DB      $01
03B2 8A        DB      $8A
03B3 04        DB      $04
03B4 8C        DB      $8C
03B5 04        DB      $04
03B6 A6        DB      $A6
03B7 09        DB      $09
03B8 A7        DB      $A7
03B9 02        DB      $02
03BA A8        DB      $A8
03BB 01        DB      $01
03BC A9        DB      $A9
03BD 03        DB      $03
03BE C6        DB      $C6
03BF 01        DB      $01
03C0 C8        DB      $C8
03C1 04        DB      $04
03C2 E6        DB      $E6
03C3 06        DB      $06
03C4 E7        DB      $E7
03C5 02        DB      $02
03C6 E8        DB      $E8
03C7 02        DB      $02
03C8 E9        DB      $E9
03C9 03        DB      $03
				; ########### DATA TABLE #2 03CA-0411 ############
03CA BD        DB      $BD
03CB BD        DB      $BD
03CC BD        DB      $BD
03CD BD        DB      $BD
03CE BD        DB      $BD
03CF BD        DB      $BD
03D0 BD        DB      $BD
03D1 BD        DB      $BD
03D2 FF        DB      $FF
03D3 00        DB      $00
03D4 FF        DB      $FF
03D5 FF        DB      $FF
03D6 FF        DB      $FF
03D7 FF        DB      $FF
03D8 00        DB      $00
03D9 FF        DB      $FF
03DA FC        DB      $FC
03DB 04        DB      $04
03DC F4        DB      $F4
03DD E4        DB      $E4
03DE C8        DB      $C8
03DF 90        DB      $90
03E0 20        DB      $20
03E1 C0        DB      $C0
03E2 BD        DB      $BD
03E3 B9        DB      $B9
03E4 B2        DB      $B2
03E5 A4        DB      $A4
03E6 88        DB      $88
03E7 F0        DB      $F0
03E8 00        DB      $00
03E9 00        DB      $00
03EA FF        DB      $FF
03EB 80        DB      $80
03EC BF        DB      $BF
03ED BF        DB      $BF
03EE BF        DB      $BF
03EF BF        DB      $BF
03F0 BC        DB      $BC
03F1 BD        DB      $BD
03F2 BD        DB      $BD
03F3 BC        DB      $BC
03F4 BF        DB      $BF
03F5 BF        DB      $BF
03F6 BF        DB      $BF
03F7 BF        DB      $BF
03F8 80        DB      $80
03F9 FF        DB      $FF
03FA FF        DB      $FF
03FB 01        DB      $01
03FC FD        DB      $FD
03FD FD        DB      $FD
03FE FD        DB      $FD
03FF FD        DB      $FD
0400 3D        DB      $3D
0401 BD        DB      $BD
0402 FF        DB      $FF
0403 00        DB      $00
0404 FF        DB      $FF
0405 FF        DB      $FF
0406 FF        DB      $FF
0407 FF        DB      $FF
0408 3C        DB      $3C
0409 BD        DB      $BD
040A BD        DB      $BD
040B BC        DB      $BC
040C BF        DB      $BF
040D BF        DB      $BF
040E BF        DB      $BF
040F BF        DB      $BF
0410 BC        DB      $BC
0411 BD        DB      $BD
				; ##########
0412 00        DB      $00
0413 00        DB      $00
0414 00        DB      $00
0415 00        DB      $00
0416 00        DB      $00
0417 00        DB      $00
0418 00        DB      $00
0419 00        DB      $00
041A 00        DB      $00
041B 00        DB      $00
041C 00        DB      $00
041D 10        DB      $10
041E 00        DB      $00
041F 00        DB      $00
0420 00        DB      $00
0421 00        DB      $00
0422 00        DB      $00
0423 00        DB      $00
0424 10        DB      $10
0425 38        DB      $38
0426 10        DB      $10
0427 00        DB      $00
0428 00        DB      $00
0429 00        DB      $00
042A 00        DB      $00
042B 10        DB      $10
042C 38        DB      $38
042D 7C        DB      $7C
042E 38        DB      $38
042F 10        DB      $10
0430 00        DB      $00
0431 00        DB      $00
0432 1F        DB      $1F
0433 3F        DB      $3F
0434 38        DB      $38
0435 38        DB      $38
0436 E1        DB      $E1
0437 F3        DB      $F3
0438 73        DB      $73
0439 73        DB      $73
043A FE        DB      $FE
043B FF        DB      $FF
043C 80        DB      $80
043D 80        DB      $80
043E 1F        DB      $1F
043F 3F        DB      $3F
0440 03        DB      $03
0441 03        DB      $03
0442 F0        DB      $F0
0443 F9        DB      $F9
0444 81        DB      $81
0445 81        DB      $81
0446 FF        DB      $FF
0447 FF        DB      $FF
0448 C0        DB      $C0
0449 C0        DB      $C0
044A 1F        DB      $1F
044B 9F        DB      $9F
044C 1C        DB      $1C
044D 1C        DB      $1C
044E C1        DB      $C1
044F F1        DB      $F1
0450 39        DB      $39
0451 39        DB      $39
0452 C7        DB      $C7
0453 C7        DB      $C7
0454 C7        DB      $C7
0455 C7        DB      $C7
0456 3F        DB      $3F
0457 3F        DB      $3F
0458 38        DB      $38
0459 38        DB      $38
045A F3        DB      $F3
045B F1        DB      $F1
045C 70        DB      $70
045D 70        DB      $70
045E FE        DB      $FE
045F FF        DB      $FF
0460 07        DB      $07
0461 07        DB      $07
0462 03        DB      $03
0463 03        DB      $03
0464 03        DB      $03
0465 03        DB      $03
0466 81        DB      $81
0467 81        DB      $81
0468 81        DB      $81
0469 81        DB      $81
046A FC        DB      $FC
046B FC        DB      $FC
046C C0        DB      $C0
046D C0        DB      $C0
046E 1F        DB      $1F
046F 1F        DB      $1F
0470 1C        DB      $1C
0471 1C        DB      $1C
0472 F0        DB      $F0
0473 E0        DB      $E0
0474 70        DB      $70
0475 38        DB      $38
0476 EE        DB      $EE
0477 7C        DB      $7C
0478 38        DB      $38
0479 38        DB      $38
047A 38        DB      $38
047B 38        DB      $38
047C 38        DB      $38
047D 00        DB      $00
047E 70        DB      $70
047F 73        DB      $73
0480 71        DB      $71
0481 00        DB      $00
0482 07        DB      $07
0483 FF        DB      $FF
0484 FE        DB      $FE
0485 00        DB      $00
0486 03        DB      $03
0487 03        DB      $03
0488 03        DB      $03
0489 00        DB      $00
048A 81        DB      $81
048B 81        DB      $81
048C 80        DB      $80
048D 00        DB      $00
048E C0        DB      $C0
048F FF        DB      $FF
0490 FF        DB      $FF
0491 00        DB      $00
0492 1C        DB      $1C
0493 9C        DB      $9C
0494 1C        DB      $1C
0495 00        DB      $00
0496 38        DB      $38
0497 38        DB      $38
0498 38        DB      $38
0499 00        DB      $00
049A 38        DB      $38
049B 38        DB      $38
049C 38        DB      $38
049D 00        DB      $00
049E 00        DB      $00
049F 30        DB      $30
04A0 70        DB      $70
04A1 70        DB      $70
04A2 00        DB      $00
04A3 03        DB      $03
04A4 07        DB      $07
04A5 07        DB      $07
04A6 00        DB      $00
04A7 FC        DB      $FC
04A8 FE        DB      $FE
04A9 00        DB      $00
04AA 00        DB      $00
04AB 1F        DB      $1F
04AC 3F        DB      $3F
04AD 38        DB      $38
04AE 00        DB      $00
04AF E1        DB      $E1
04B0 F3        DB      $F3
04B1 00        DB      $00
04B2 00        DB      $00
04B3 FF        DB      $FF
04B4 FF        DB      $FF
04B5 38        DB      $38
04B6 00        DB      $00
04B7 1F        DB      $1F
04B8 9F        DB      $9F
04B9 1C        DB      $1C
04BA 00        DB      $00
04BB C0        DB      $C0
04BC F1        DB      $F1
04BD 39        DB      $39
04BE 00        DB      $00
04BF FF        DB      $FF
04C0 FF        DB      $FF
04C1 C3        DB      $C3
04C2 00        DB      $00
04C3 1C        DB      $1C
04C4 9C        DB      $9C
04C5 9E        DB      $9E
04C6 00        DB      $00
04C7 38        DB      $38
04C8 38        DB      $38
04C9 38        DB      $38
04CA 00        DB      $00
04CB FE        DB      $FE
04CC FE        DB      $FE
04CD 38        DB      $38
04CE 00        DB      $00
04CF 1F        DB      $1F
04D0 3F        DB      $3F
04D1 38        DB      $38
04D2 00        DB      $00
04D3 E1        DB      $E1
04D4 F3        DB      $F3
04D5 03        DB      $03
04D6 00        DB      $00
04D7 FE        DB      $FE
04D8 FF        DB      $FF
04D9 80        DB      $80
04DA 70        DB      $70
04DB 70        DB      $70
04DC 70        DB      $70
04DD 70        DB      $70
04DE 07        DB      $07
04DF 07        DB      $07
04E0 07        DB      $07
04E1 07        DB      $07
04E2 00        DB      $00
04E3 F0        DB      $F0
04E4 F0        DB      $F0
04E5 00        DB      $00
04E6 38        DB      $38
04E7 38        DB      $38
04E8 38        DB      $38
04E9 38        DB      $38
04EA 00        DB      $00
04EB 00        DB      $00
04EC 00        DB      $00
04ED 00        DB      $00
04EE 38        DB      $38
04EF 38        DB      $38
04F0 38        DB      $38
04F1 38        DB      $38
04F2 1C        DB      $1C
04F3 1F        DB      $1F
04F4 1F        DB      $1F
04F5 1C        DB      $1C
04F6 39        DB      $39
04F7 F1        DB      $F1
04F8 E1        DB      $E1
04F9 71        DB      $71
04FA C3        DB      $C3
04FB C3        DB      $C3
04FC C3        DB      $C3
04FD C3        DB      $C3
04FE 9F        DB      $9F
04FF 9F        DB      $9F
0500 9D        DB      $9D
0501 9C        DB      $9C
0502 38        DB      $38
0503 B8        DB      $B8
0504 F8        DB      $F8
0505 F8        DB      $F8
0506 38        DB      $38
0507 38        DB      $38
0508 38        DB      $38
0509 38        DB      $38
050A 38        DB      $38
050B 38        DB      $38
050C 38        DB      $38
050D 38        DB      $38
050E 03        DB      $03
050F 03        DB      $03
0510 01        DB      $01
0511 00        DB      $00
0512 80        DB      $80
0513 FE        DB      $FE
0514 FF        DB      $FF
0515 07        DB      $07
0516 70        DB      $70
0517 70        DB      $70
0518 7F        DB      $7F
0519 3F        DB      $3F
051A 07        DB      $07
051B 07        DB      $07
051C E7        DB      $E7
051D C3        DB      $C3
051E 00        DB      $00
051F 00        DB      $00
0520 FE        DB      $FE
0521 FC        DB      $FC
0522 38        DB      $38
0523 38        DB      $38
0524 3F        DB      $3F
0525 1F        DB      $1F
0526 00        DB      $00
0527 00        DB      $00
0528 F0        DB      $F0
0529 E0        DB      $E0
052A 38        DB      $38
052B 38        DB      $38
052C 38        DB      $38
052D 38        DB      $38
052E 1C        DB      $1C
052F 1C        DB      $1C
0530 1C        DB      $1C
0531 1C        DB      $1C
0532 39        DB      $39
0533 39        DB      $39
0534 39        DB      $39
0535 38        DB      $38
0536 C3        DB      $C3
0537 C3        DB      $C3
0538 FF        DB      $FF
0539 FF        DB      $FF
053A 9C        DB      $9C
053B 9C        DB      $9C
053C 9C        DB      $9C
053D 1C        DB      $1C
053E 78        DB      $78
053F 38        DB      $38
0540 38        DB      $38
0541 38        DB      $38
0542 38        DB      $38
0543 38        DB      $38
0544 FE        DB      $FE
0545 FE        DB      $FE
0546 38        DB      $38
0547 38        DB      $38
0548 3F        DB      $3F
0549 1F        DB      $1F
054A 00        DB      $00
054B 00        DB      $00
054C F3        DB      $F3
054D E1        DB      $E1
054E 07        DB      $07
054F 07        DB      $07
0550 FF        DB      $FF
0551 FE        DB      $FE
				; ################## START CP/M LOADING ROUTINE ####################
0552 DBFD      IN      A,($FD)	; read 1 byte from 8272 Data Register, it should be 80 (result of the
				; invalid command sent to 8272 by the instruction at 002A).
0554 FE80      CP      $80	; This tests whether 8272 present and properly reset.
0556 C20400    JP      NZ,$0004	; if not 80, restart execution from the beginning of the BOOT EPROM	---@@@0558:00->28
0559 216105    LD      HL,$0561
055C 3E41      LD      A,$41
055E C35100    JP      $0051	; (see comments for code at 0051)					---@@@0560:00->28
;				; after the jump, "41" is written to 8255 Port C which means:
				; signal "O6" set to 1, "O5" set to 0, border color set to blue;
				; then bit 7 of register R is reset to 0 by instruction "LD R,A"
				; and configuration is changed to CP/M ("O6"=1). In this new config
				; execution starts from address stored in register HL previously.
				; The entire BOOT EPROM code was previously copied to beginning of DRAM#0
				; (see comments at 001D) and DRAM#0 is located at 0000 in CP/M config
				; so HL points now to exactly the next instruction below.
0561 3E01      LD      A,$01
0563 D3FE      OUT     ($FE),A
0565 210000    LD      HL,$0000
0568 1100F8    LD      DE,$F800
056B 010008    LD      BC,$0800
056E EDB0      LDIR    
0570 C373FD    JP      $FD73
0573 ED5E      IM      2
0575 21E8FF    LD      HL,$FFE8
0578 7C        LD      A,H
0579 ED47      LD      I,A
057B 7D        LD      A,L
057C D3E3      OUT     ($E3),A
057E 3EFF      LD      A,$FF
0580 D3E3      OUT     ($E3),A
0582 3E01      LD      A,$01
0584 D3E3      OUT     ($E3),A
0586 21E4FF    LD      HL,$FFE4
0589 CD0BFF    CALL    $FF0B
058C 0604      LD      B,$04
058E C5        PUSH    BC
058F 010402    LD      BC,$0204
0592 CDBDFE    CALL    $FEBD
0595 CDF9FE    CALL    $FEF9
0598 C1        POP     BC
0599 3AD5FF    LD      A,($FFD5)
059C CB6F      BIT     5,A
059E 2016      JR      NZ,$05B6
05A0 2195FF    LD      HL,$FF95
05A3 34        INC     (HL)
05A4 10E8      DJNZ    $058E
05A6 F3        DI      
05A7 ED46      IM      0
05A9 AF        XOR     A
05AA ED47      LD      I,A
05AC 210400    LD      HL,$0004	;									---@@@05AE:00->28
05AF 3EC1      LD      A,$C1
05B1 D3FE      OUT     ($FE),A
05B3 ED4F      LD      R,A
05B5 E9        JP      (HL)
05B6 010702    LD      BC,$0207
05B9 CDBDFE    CALL    $FEBD
05BC CD40FF    CALL    $FF40
05BF CD31FF    CALL    $FF31
05C2 014A02    LD      BC,$024A
05C5 CDBDFE    CALL    $FEBD
05C8 CDF9FE    CALL    $FEF9
05CB 3AD5FF    LD      A,($FFD5)
05CE E6C0      AND     $C0
05D0 2811      JR      Z,$05E3
05D2 21ACFF    LD      HL,$FFAC
05D5 1199FF    LD      DE,$FF99
05D8 010A00    LD      BC,$000A
05DB EDB0      LDIR    
05DD 21E6FF    LD      HL,$FFE6
05E0 CD0BFF    CALL    $FF0B
05E3 3A99FF    LD      A,($FF99)
05E6 B7        OR      A
05E7 0604      LD      B,$04
05E9 1E01      LD      E,$01
05EB 2002      JR      NZ,$05EF
05ED 0610      LD      B,$10
05EF CD54FF    CALL    $FF54
05F2 1C        INC     E
05F3 10FA      DJNZ    $05EF
05F5 210000    LD      HL,$0000
05F8 22D0FF    LD      ($FFD0),HL
05FB 2100F4    LD      HL,$F400
05FE E5        PUSH    HL
05FF E1        POP     HL
0600 0640      LD      B,$40
0602 7E        LD      A,(HL)
0603 B7        OR      A
0604 2014      JR      NZ,$061A
0606 C5        PUSH    BC
0607 E5        PUSH    HL
0608 110900    LD      DE,$0009
060B 19        ADD     HL,DE
060C EB        EX      DE,HL
060D 21DEFF    LD      HL,$FFDE
0610 0603      LD      B,$03
0612 1A        LD      A,(DE)
0613 E67F      AND     $7F
0615 BE        CP      (HL)
0616 280A      JR      Z,$0622
0618 E1        POP     HL
0619 C1        POP     BC
061A 112000    LD      DE,$0020
061D 19        ADD     HL,DE
061E 10E2      DJNZ    $0602
0620 1884      JR      $05A6
0622 13        INC     DE
0623 23        INC     HL
0624 10EC      DJNZ    $0612
0626 D1        POP     DE
0627 211000    LD      HL,$0010
062A 19        ADD     HL,DE
062B 1100FC    LD      DE,$FC00
062E D5        PUSH    DE
062F 011000    LD      BC,$0010
0632 EDB0      LDIR    
0634 E3        EX      (SP),HL
0635 7E        LD      A,(HL)
0636 E5        PUSH    HL
0637 2600      LD      H,$00
0639 6F        LD      L,A
063A 01FF03    LD      BC,$03FF
063D CB25      SLA     L
063F CB14      RL      H
0641 10FA      DJNZ    $063D
0643 23        INC     HL
0644 ED5B9FFF  LD      DE,($FF9F)
0648 0C        INC     C
0649 ED52      SBC     HL,DE
064B 30FB      JR      NC,$0648
064D 19        ADD     HL,DE
064E 3A99FF    LD      A,($FF99)
0651 B7        OR      A
0652 0608      LD      B,$08
0654 2808      JR      Z,$065E
0656 0602      LD      B,$02
0658 2D        DEC     L
0659 CB3D      SRL     L
065B CB3D      SRL     L
065D 2C        INC     L
065E 3E02      LD      A,$02
0660 81        ADD     A,C
0661 57        LD      D,A
0662 5D        LD      E,L
0663 7A        LD      A,D
0664 32D4FF    LD      ($FFD4),A
0667 CD54FF    CALL    $FF54
066A 2A9AFF    LD      HL,($FF9A)
066D 23        INC     HL
066E 1C        INC     E
066F 7B        LD      A,E
0670 BD        CP      L
0671 3803      JR      C,$0676
0673 14        INC     D
0674 1E01      LD      E,$01
0676 10EB      DJNZ    $0663
0678 E1        POP     HL
0679 23        INC     HL
067A 3E0F      LD      A,$0F
067C A5        AND     L
067D 2880      JR      Z,$05FF
067F 7E        LD      A,(HL)
0680 B7        OR      A
0681 20B3      JR      NZ,$0636
0683 F3        DI      
0684 210000    LD      HL,$0000
0687 7E        LD      A,(HL)
0688 FEF3      CP      $F3
068A D9        EXX     
068B 214300    LD      HL,$0043
068E CAAFFD    JP      Z,$FDAF
0691 D9        EXX     
0692 E9        JP      (HL)
0693 08        EX      AF,AF'
0694 3E7F      LD      A,$7F
0696 D3EB      OUT     ($EB),A
0698 3A9EFF    LD      A,($FF9E)
069B D3EB      OUT     ($EB),A
069D 08        EX      AF,AF'
069E FB        EI      
069F ED4D      RETI    

06A1 EDA2      INI     
06A3 FB        EI      
06A4 ED4D      RETI    

06A6 22D2FF    LD      ($FFD2),HL
06A9 2193FE    LD      HL,$FE93
06AC 22E8FF    LD      ($FFE8),HL
06AF 0E00      LD      C,$00
06B1 FB        EI      
06B2 ED4D      RETI    

06B4 DBF5      IN      A,($F5)
06B6 CB7F      BIT     7,A
06B8 28FA      JR      Z,$06B4
06BA CB77      BIT     6,A
06BC C9        RET     

06BD 2195FF    LD      HL,$FF95
06C0 CDB4FE    CALL    $FEB4
06C3 C2A6FD    JP      NZ,$FDA6
06C6 79        LD      A,C
06C7 D3FD      OUT     ($FD),A
06C9 4E        LD      C,(HL)
06CA 23        INC     HL
06CB 10F3      DJNZ    $06C0
06CD C9        RET     

06CE 1195FF    LD      DE,$FF95
06D1 21A1FE    LD      HL,$FEA1
06D4 22E8FF    LD      ($FFE8),HL
06D7 2AD0FF    LD      HL,($FFD0)
06DA 1803      JR      $06DF
06DC 1A        LD      A,(DE)
06DD 13        INC     DE
06DE 4F        LD      C,A
06DF CDB4FE    CALL    $FEB4
06E2 C2A6FD    JP      NZ,$FDA6
06E5 79        LD      A,C
06E6 0EFD      LD      C,$FD
06E8 ED79      OUT     (C),A
06EA 10F0      DJNZ    $06DC
06EC 76        HALT    
06ED DBF5      IN      A,($F5)
06EF E620      AND     $20
06F1 20F9      JR      NZ,$06EC
06F3 2193FE    LD      HL,$FE93
06F6 22E8FF    LD      ($FFE8),HL
06F9 21D5FF    LD      HL,$FFD5
06FC 0608      LD      B,$08
06FE CDB4FE    CALL    $FEB4
0701 C8        RET     Z

0702 DBFD      IN      A,($FD)
0704 77        LD      (HL),A
0705 23        INC     HL
0706 10F6      DJNZ    $06FE
0708 C3A6FD    JP      $FDA6
070B F3        DI      
070C 3E7F      LD      A,$7F
070E D3EB      OUT     ($EB),A
0710 3A9EFF    LD      A,($FF9E)
0713 D3EB      OUT     ($EB),A
0715 3EFF      LD      A,$FF
0717 D3F3      OUT     ($F3),A
0719 3A9DFF    LD      A,($FF9D)
071C D3F3      OUT     ($F3),A
071E FB        EI      
071F 010303    LD      BC,$0303
0722 189C      JR      $06C0
0724 010801    LD      BC,$0108
0727 CDBDFE    CALL    $FEBD
072A CDF9FE    CALL    $FEF9
072D 3AD5FF    LD      A,($FFD5)
0730 C9        RET     

0731 3AD4FF    LD      A,($FFD4)
0734 2196FF    LD      HL,$FF96
0737 BE        CP      (HL)
0738 C8        RET     Z

0739 77        LD      (HL),A
073A 010F03    LD      BC,$030F
073D CDBDFE    CALL    $FEBD
0740 CD24FF    CALL    $FF24
0743 CB6F      BIT     5,A
0745 28F9      JR      Z,$0740
0747 E6D8      AND     $D8
0749 C2A6FD    JP      NZ,$FDA6
074C CD24FF    CALL    $FF24
074F FE80      CP      $80
0751 C8        RET     Z

0752 18F8      JR      $074C
0754 C5        PUSH    BC
0755 D5        PUSH    DE
0756 CD31FF    CALL    $FF31
0759 1600      LD      D,$00
075B 2AA1FF    LD      HL,($FFA1)
075E 19        ADD     HL,DE
075F 7E        LD      A,(HL)
0760 3298FF    LD      ($FF98),A
0763 060A      LD      B,$0A
0765 C5        PUSH    BC
0766 3A99FF    LD      A,($FF99)
0769 B7        OR      A
076A 010609    LD      BC,$0906
076D 2802      JR      Z,$0771
076F CBF1      SET     6,C
0771 CDCEFE    CALL    $FECE
0774 AF        XOR     A
0775 B1        OR      C
0776 C1        POP     BC
0777 200E      JR      NZ,$0787
0779 21D7FF    LD      HL,$FFD7
077C 7E        LD      A,(HL)
077D 2B        DEC     HL
077E B6        OR      (HL)
077F 2006      JR      NZ,$0787
0781 2B        DEC     HL
0782 7E        LD      A,(HL)
0783 E6D8      AND     $D8
0785 2805      JR      Z,$078C
0787 10DC      DJNZ    $0765
0789 C3A6FD    JP      $FDA6
078C 2AD2FF    LD      HL,($FFD2)
078F 22D0FF    LD      ($FFD0),HL
0792 D1        POP     DE
0793 C1        POP     BC
0794 C9        RET     

0795 00        DB      $00
0796 00        DB      $00
0797 00        DB      $00
0798 01        DB      $01
0799 02        DB      $02
079A 09        DB      $09
079B 2A        DB      $2A
079C FF        DB      $FF
079D 02        DB      $02
079E 00        DB      $00
079F 24        DB      $24
07A0 00        DB      $00
07A1 A2        DB      $A2
07A2 FF        DB      $FF
07A3 01        DB      $01
07A4 05        DB      $05
07A5 09        DB      $09
07A6 04        DB      $04
07A7 08        DB      $08
07A8 03        DB      $03
07A9 07        DB      $07
07AA 02        DB      $02
07AB 06        DB      $06
07AC 00        DB      $00
07AD 1A        DB      $1A
07AE 07        DB      $07
07AF 80        DB      $80
07B0 01        DB      $01
07B1 80        DB      $80
07B2 1A        DB      $1A
07B3 00        DB      $00
07B4 B5        DB      $B5
07B5 FF        DB      $FF
07B6 01        DB      $01
07B7 07        DB      $07
07B8 0D        DB      $0D
07B9 13        DB      $13
07BA 19        DB      $19
07BB 05        DB      $05
07BC 0B        DB      $0B
07BD 11        DB      $11
07BE 17        DB      $17
07BF 03        DB      $03
07C0 09        DB      $09
07C1 0F        DB      $0F
07C2 15        DB      $15
07C3 02        DB      $02
07C4 08        DB      $08
07C5 0E        DB      $0E
07C6 14        DB      $14
07C7 1A        DB      $1A
07C8 06        DB      $06
07C9 0C        DB      $0C
07CA 12        DB      $12
07CB 18        DB      $18
07CC 04        DB      $04
07CD 0A        DB      $0A
07CE 10        DB      $10
07CF 16        DB      $16
07D0 00        DB      $00
07D1 F4        DB      $F4
07D2 00        DB      $00
07D3 F4        DB      $F4
07D4 02        DB      $02
07D5 00        DB      $00
07D6 00        DB      $00
07D7 00        DB      $00
07D8 00        DB      $00
07D9 00        DB      $00
07DA 00        DB      $00
07DB 00        DB      $00
07DC 00        DB      $00
07DD 00        DB      $00
07DE 53        DB      $53
07DF 59        DB      $59
07E0 53        DB      $53
07E1 00        DB      $00
07E2 00        DB      $00
07E3 00        DB      $00
07E4 EF        DB      $EF
07E5 01        DB      $01
07E6 EF        DB      $EF
07E7 17        DB      $17
07E8 93        DB      $93
07E9 FE        DB      $FE
07EA 9E        DB      $9E
07EB FE        DB      $FE
07EC A6        DB      $A6
07ED FE        DB      $FE
07EE 9E        DB      $9E
07EF FE        DB      $FE
07F0 3E0F      LD      A,$0F
07F2 D3DF      OUT     ($DF),A	; set bit 7 of port C 8255 (SO)
07F4 210000    LD      HL,$0000
07F7 D9        EXX     
07F8 FF        RST     $38	;								---@@@07F8:FFFFFF->C33828
07F9 FF        RST     $38
07FA FF        RST     $38
07FB FF        RST     $38
07FC FF        RST     $38
07FD FF        RST     $38
07FE FF        RST     $38
07FF FF        RST     $38